package com.ruoyi.process.ccs.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.process.ccs.mapper.CcsEquipmentMapper;
import com.ruoyi.process.ccs.domain.CcsEquipment;
import com.ruoyi.process.ccs.service.ICcsEquipmentService;
import com.ruoyi.common.core.text.Convert;

/**
 * 设备库Service业务层处理
 *
 * @author Xianlu Tech
 * @date 2020-04-02
 */
@Service
public class CcsEquipmentServiceImpl implements ICcsEquipmentService {
    @Autowired
    private CcsEquipmentMapper ccsEquipmentMapper;

    /**
     * 查询设备库
     *
     * @param id 设备库ID
     * @return 设备库
     */
    @Override
    public CcsEquipment selectCcsEquipmentById(String id) {
        return ccsEquipmentMapper.selectCcsEquipmentById(id);
    }

    /**
     * 查询设备库列表
     *
     * @param ccsEquipment 设备库
     * @return 设备库
     */
    @Override
    public List<CcsEquipment> selectCcsEquipmentList(CcsEquipment ccsEquipment) {
        return ccsEquipmentMapper.selectCcsEquipmentList(ccsEquipment);
    }

    /**
     * 新增设备库
     *
     * @param ccsEquipment 设备库
     * @return 结果
     */
    @Override
    public int insertCcsEquipment(CcsEquipment ccsEquipment) {
        return ccsEquipmentMapper.insertCcsEquipment(ccsEquipment);
    }

    /**
     * 修改设备库
     *
     * @param ccsEquipment 设备库
     * @return 结果
     */
    @Override
    public int updateCcsEquipment(CcsEquipment ccsEquipment) {
        return ccsEquipmentMapper.updateCcsEquipment(ccsEquipment);
    }

    /**
     * 删除设备库对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteCcsEquipmentByIds(String ids) {
        return ccsEquipmentMapper.deleteCcsEquipmentByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除设备库信息
     *
     * @param id 设备库ID
     * @return 结果
     */
    @Override
    public int deleteCcsEquipmentById(String id) {
        return ccsEquipmentMapper.deleteCcsEquipmentById(id);
    }
}
